import request from "@/utils/request";

export function getCustomerRechargeHandlerList(params) {
  return request({
    url: "/cut/customerRechargeHandler/list",
    method: "get",
    params,
  });
}

export function customerRechargeHandler(data) {
  return request({
    url: "/cut/customerRechargeHandler",
    method: "post",
    data,
  });
}

export function editCustomerRechargeHandler(data) {
  return request({
    url: "/cut/customerRechargeHandler",
    method: "put",
    data,
  });
}

export function getCustomerRechargeHandlerDetail(id) {
  return request({
    url: `/cut/customerRechargeHandler/${id}`,
    method: "get",
  });
}

export function deleteCustomerRechargeHandler(id) {
  return request({
    url: `/cut/customerRechargeHandler/${id}`,
    method: "delete",
  });
}
// 获取汇率
export function getExchangeRateList() {
  return request({
    url: "/sea/exchangerate/anonymousList",
    method: "get",
  });
}
// 线下充值
export function customerRecharge(data) {
  return request({
    url: "/cut/customerRecharge",
    method: "post",
    data,
  });
}
// 本币数额换算接口
export function calculateLocalMoney(data) {
  return request({
    url: "/sea/exchangerate/localCalculate",
    method: "post",
    data,
  });
}
// 获取充值记录
export function getCustomerRechargeList(params) {
  return request({
    url: "/cut/customerRecharge/anonymousList",
    method: "get",
    params,
  });
}

export function getServiceFee(data) {
  return request({
    url: "/sea/exchangerate/servicePrcie",
    method: "post",
    data,
  });
}
// 发起支付
export function doAggPayment(data) {
  return request({
    url: `/cut/aggPayment/doAggPayment`,
    method: "post",
    data,
  });
}
// 外币数额换算接口
export function foreignCalculate(data) {
  return request({
    url: "/sea/exchangerate/foreignCalculate",
    method: "post",
    data,
  });
}
// 账户批量增减款
export function transAccountFund(data) {
  return request({
    url: `/sea/mediaTransactions/save`,
    method: "post",
    data,
  });
}

export function getTransAccountFundList(params) {
  return request({
    url: `/sea/mediaTransactions/anonymouslist`,
    method: "get",
    params,
  });
}
// 获取订单支付状态
export function getOrderPayStatus(orderId) {
  return request({
    url: `/cut/aggPayment/doPaymentDealQuery/${orderId}`,
    method: "get",
  });
}
